/*status apps*/
$(document).ready(function(){
	id = $('.post').attr('id');
	id = id.substring('post-'.length);

	if (getCookie('p'+id) == null) {
		setCookie('p'+id,'1', 365);
		$.post(home_url + '/ajax', {
			app:'pviews',
			id:id
		},function(data){
			
		});
	}
	
});

$('.post').each(function(){
	id = $(this).attr('id');
	id = id.substring('post-'.length);
	$.post(home_url + '/ajax', {
		app:'related',
		id: id
	},function(data){
		$('.related-post').html(data);
	});	
});

/*modify control*/
$('#main .search').remove();
$('#sub .slock').remove();
$('#sub #search').removeClass('sdrop');
$('#sub #search').addClass('slock');